<#include "/common/layout.html">
<@header>
</@header>
<@body>
<div class="content-wrapper">
  <!-- Content Header (Page header) -->
  <section class="content-header">
    <h1>
      <small>房屋出租管理 > 水电信息维护</small>
    </h1>
  </section>
  <!-- Main content -->
  <section class="content">
    <!-- Your Page Content Here -->
    <div class="row">
      <div class="col-xs-12">
        <div class="box">
	          <div class="box-header">
				<@shiro.hasPermission name="addPropertyInfo">
	            <div class="input-group" style="float:left">
		            <a class="btn btn-primary dialog" href="javascript:;" data-url="/hm/propertyManager/add" data-title="添加水电信息" data-width="850" data-height="550"><i class="fa fa-plus"></i> 添加水电信息</a>
	            </div>
			    </@shiro.hasPermission>
	            <div class="input-group" style="float: left">
					<form action="/hm/propertyManager/list/1" method="post" class="form-inline">
						<div class="input-group-btn">
	                       <input type="text" name="search" value="${search!}" class="form-control" placeholder="Search">
	                       <button class="btn btn-default" type="submit"><i class="fa fa-search"></i></button>
	                       <a href="/hm/propertyManager/list/1" class="btn btn-default"><i class="fa fa-refresh"></i></a>
	                    </div>
					</form>
	            </div>
			   <div class="pull-right">
				   <form method="post" action="/exportExcel/propertyInfo">
					   <button type="submit" class="btn btn-success " ><i class="fa fa-save"></i>  导 出</button>
				   </form>
			   </div>
	          </div><!-- /.box-header -->
          <div class="box-body table-responsive no-padding">
            <table class="table table-hover">
              <tr>
                <th>房间编号</th>
                <th>所属年月</th>
                <th>当前用水量(吨)</th>
				<th>当前用电量(度)</th>
				<th>记录时间</th>
                <th width="120px">操作</th>
              </tr>
              <#list pageData.getRecords() as propertyInfo>
              	  <tr>
	                <td>${(propertyInfo.roomName)!}</td>
	                <td>${(propertyInfo.month)!}</td>
					<td>${(propertyInfo.waterNum)!}</td>
					<td>${(propertyInfo.electricNum)!}</td>
					<td>${propertyInfo.recordDateTime?string('yyyy-MM-dd HH:mm:ss')}</td>
	                <td>
	                	<@shiro.hasPermission name="editTenantInfo">
	                	  <a class="btn btn-primary btn-xs dialog" href="javascript:;" data-url="/hm/propertyManager/edit?roomName=${(propertyInfo.roomName)!}&month=${(propertyInfo.month)!}" data-title="编辑水电费信息" data-width="850" data-height="550">编辑</a>
					    </@shiro.hasPermission>
					    <@shiro.hasPermission name="deleteTenantInfo">
	                	<a class="btn btn-danger btn-xs"
	                	 data-tiggle="ajax"
	                	 data-submit-url="/hm/propertyManager/delete?roomName=${(propertyInfo.roomName)!}&month=${(propertyInfo.month)!}"
	                	 data-confirm="您确定要删除该条记录吗?">删除</a>
				        </@shiro.hasPermission>
				        <a class="btn btn-primary btn-xs dialog" href="javascript:;" data-url="/hm/propertyManager/preview?roomName=${(propertyInfo.roomName)!}&month=${(propertyInfo.month)!}" data-title="预览本月房租信息" data-width="850" data-height="550">预览本月房租</a>
	                </td>
	              </tr>
              </#list>
            </table>
          </div><!-- /.box-body -->
          <div class="box-footer row">
            <div class="col-md-6">
         	  <#include "/common/paginateBar.html" />
	  		  <@paginate pageData=pageData actionUrl="/hm/propertyManager/list/" urlParas="?search=${search!}&daterange=${daterange!}"  />
            </div>
            <div class="col-md-6 pull-left">
	             <#include "/common/paginate.html" />
	  			 <@paginate currentPage=pageData.getCurrent() totalPage=pageData.getPages() actionUrl="/hm/propertyManager/list/" urlParas="?search=${search!}&pageSize=${pageSize!}"  />
            </div>
          </div>
        </div><!-- /.box -->
      </div>
    </div>
  </section><!-- /.content -->
</div><!-- /.content-wrapper -->
</@body>
<@footer>
</@footer>